package com.john.design.创建性模型.简单工厂模式;

/**
 * @Author: JohnCoding
 * @Description:
 * @date: 2020/8/9 22:35
 */
public class VideoFactory {
    public Video buidVideo(String type){
        if ("java".equalsIgnoreCase(type)) {
            return new JavaVideo();
        }else if ("pythod".equalsIgnoreCase(type)){
            return new PythodVideo();
        }
        return null;
    }
}
